package cn.itcast.hotel.config;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author liudo
 * @version 1.0
 * @project hotel-demo
 * @description Es
 * @date 2023/8/25 14:34:55
 */
@Configuration
public class EsConfiguration {

    @Bean
    public RestHighLevelClient restHighLevelClient() {
        return new RestHighLevelClient(
                RestClient.builder(
                        HttpHost.create("http://192.168.222.60:9200")
                )
        );
    }
}
